<template>
  <div class="treebox">
    <el-tree
      ref="tree"
      :data="data"
      :show-checkbox="showcheckbox"
      node-key="id"
      highlight-current
      :accordio="showifaccordion"
      :props="defaultProps"
    />
  </div>
</template>

<script>

export default {
  name: 'BossSoftTree',
  props: {
    data: {
      require: true,
      type: Array,
      default: function() {
        return { message: '没有传递.' }
      }
    },
    showcheckbox: {
      type: Boolean,
      default: false
    },
    showifaccordion: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      defaultProps: {
        children: 'children',
        label: 'label'
      }
    }
  }
}
</script>

<style scoped lang="scss">
  .treebox{
    padding:10px;
  }
</style>
